#ifndef TACTICS_HPP_INCLUDED
#define TACTICS_HPP_INCLUDED

#include <boost/shared_ptr.hpp>
#include <string>
#include <vector>

#include "unit.hpp"
#include "wml_node_fwd.hpp"

namespace game {

class tactic;
typedef boost::shared_ptr<tactic> tactic_ptr;
typedef boost::shared_ptr<const tactic> const_tactic_ptr;

class tactic
{
public:
	static void get_available_tactics(const unit& u, std::vector<const_tactic_ptr>& tactics);
	static const_tactic_ptr create(const std::string& key);
	static const_tactic_ptr get(const std::string& key);

	tactic(const std::string& description, const std::string& help_string);
	virtual ~tactic();

	virtual void apply(unit_ptr u) const = 0;
	virtual bool can_use(const_unit_ptr u) const = 0;
	virtual const std::string& description() const { return description_; }
	virtual const std::string& help_string() const { return help_string_; }
private:
	std::string description_, help_string_;
};

}

#endif
